<extend name='Index/index' />

<block name="main">
                <script src='__PUBLIC__/store_public/kind/kindeditor-min.js'></script>
                <script src='__PUBLIC__/store_public/kind/zh_CN.js'></script>
                <script>
                    // 富文本编辑器
                    var editor;
                    KindEditor.ready(function(K) {
                        //  描述多文本域的 name名
                        editor = K.create('textarea[name="g_detail"]', {
                            resizeType : 1,
                            allowPreviewEmoticons : false,
                            allowImageUpload : false,
                            items : [
                                'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                                'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                                'insertunorderedlist', '|', 'emoticons', 'image', 'link']
                        });
                        // 编辑富文本内容
                        // editor.html('<?=  $goods['describe'] ?>');
                    })
                </script>
                <div class="bg-light lter b-b wrapper-md">
                    <h1 class="m-n font-thin h3">编辑商品</h1>
                </div>
                <div class="wrapper-md">
                    <div class="panel panel-default">
                        <div class="table-responsive">
                            <form action="<{:U('Admin/Goods/updata')}>" method="post" style="margin-left:30px;" enctype="multipart/form-data">
                                <br>
                                <input type="hidden" name="g_id" value="<{$goods['g_id']}>">
                                商品名: &nbsp;&nbsp;&nbsp;<input type="text" name="g_name" value="<{$goods['g_name']}>"><br><br>
                                商品价格: <input type="number" name="price" value="<{$goods['price']}>">&nbsp;刀币<br><br>
                                商品等级: 
                                    <select name="g_rank">
                                        <option value="0" <if condition="$goods['g_rank'] eq 0">selected</if>>普通</option>
                                        <option value="1" <if condition="$goods['g_rank'] eq 1">selected</if>>稀有</option>
                                        <option value="2" <if condition="$goods['g_rank'] eq 2">selected</if>>至宝</option>
                                        <option value="3" <if condition="$goods['g_rank'] eq 3">selected</if>>神话</option>
                                        <option value="4" <if condition="$goods['g_rank'] eq 4">selected</if>>传说</option>
                                    </select><br><br>
                                是否上架:&nbsp;
                                    <label><input type="radio" name="up" value="0" <if condition="$goods['up'] eq o">checked</if>>下架</label>
                                    <label><input type="radio" name="up" value="1" <if condition="$goods['up'] eq 1">checked</if>>上架</label><br><br>
                                商品描述: <textarea name="g_detail"><{$goods['g_detail']}></textarea><br><br>
                                <button class="btn btn-success">确认</button><br><br>
                            </form>
                        </div>
                    </div>
                    
                    <p></p>
                    <p></p>
                </div>

</block>